<?php


namespace app\common\model;


class BankSub extends  BaseModel
{
    protected $name = 'bank_sub';
    protected $createTime = false;
    protected $updateTime = false;
    // 当前数据版本号
    private static $version = '0.0.0';

    /**
     * 从数据库中获取所有可用银行
     * @return array
     */
    public function getList($areaid,$bankid)
    {
        return self::useGlobalScope(false)
                    ->where('status',0)
                    ->where('areaid',$areaid)
                    ->where('bankid',$bankid)
                    ->column('id, interbankid, name, areaid,bankid', 'id');
    }
}